package net.entelijan.cobean.examples.showcase.config.filesel;

import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;

import net.entelijan.cobean.examples.util.ExamplesUtil;
import net.entelijan.scf.DefaultShowcasePanel;
import net.miginfocom.swing.MigLayout;

public class ConfigFileselPanel extends DefaultShowcasePanel {

	private static final long serialVersionUID = 1L;

	private JComboBox directoryFileSelFieldComboBox = new JComboBox();
	
	private JButton directoryFileSelChooserButton = new JButton("...");
	
	private JComboBox fileFileSelFieldComboBox = new JComboBox();
	
	private JButton fileFileSelChooserButton = new JButton("...");
	
	private JButton showModelButton = new JButton("Show Model");

	private JButton setHomeButton = new JButton("Set {user.home}");

	public ConfigFileselPanel() {
		super();
		setLayout(new MigLayout());
		
		add(new JLabel("Directory"), "");
		add(directoryFileSelFieldComboBox, "w 100:max:max");
		add(directoryFileSelChooserButton, "wrap");
		
		add(new JLabel("File"), "");
		add(fileFileSelFieldComboBox, "w 100:max:max");
		add(fileFileSelChooserButton, "wrap");
		
		add(new JPanel(), "h max, grow, wrap");
		
		add(ExamplesUtil.createButtonsPanel(150, this.showModelButton,
				this.showModelButton, this.setHomeButton), "span 3");

	}

	public JComboBox getDirectoryFileSelFieldComboBox() {
		return directoryFileSelFieldComboBox;
	}

	public void setDirectoryFileSelFieldComboBox(
			JComboBox directoryFileSelFieldComboBox) {
		this.directoryFileSelFieldComboBox = directoryFileSelFieldComboBox;
	}

	public JButton getDirectoryFileSelChooserButton() {
		return directoryFileSelChooserButton;
	}

	public void setDirectoryFileSelChooserButton(JButton directoryFileSelChooseButton) {
		this.directoryFileSelChooserButton = directoryFileSelChooseButton;
	}

	public JComboBox getFileFileSelFieldComboBox() {
		return fileFileSelFieldComboBox;
	}

	public void setFileFileSelFieldComboBox(JComboBox fileFileSelFieldComboBox) {
		this.fileFileSelFieldComboBox = fileFileSelFieldComboBox;
	}

	public JButton getFileFileSelChooserButton() {
		return fileFileSelChooserButton;
	}

	public void setFileFileSelChooserButton(JButton fileFileSelChooseButton) {
		this.fileFileSelChooserButton = fileFileSelChooseButton;
	}

	public JButton getShowModelButton() {
		return showModelButton;
	}

	public void setShowModelButton(JButton showModelButton) {
		this.showModelButton = showModelButton;
	}

	public JButton getSetHomeButton() {
		return setHomeButton;
	}

	public void setSetHomeButton(JButton setHomeButton) {
		this.setHomeButton = setHomeButton;
	}

}
